package cn.tt.tuantuanerp.tuantuanerp.comment.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;


/**
 * 订单表新增类
 * @author Wangyujie
 */
@Data
public class OrderAddNewDTO implements Serializable {

    /**
     * 订单备注
     */
    @ApiModelProperty(value = "订单备注", example = "这是一个测试订单备注")
    private String orderNotes;
    /**
     * 优惠金额
     */
    @ApiModelProperty(value = "优惠金额")
    private BigDecimal discount;
    /**
     * 订单id
     */
    @ApiModelProperty(value = "订单id",required = true)
    private String OrderId;
    /**
     * 订单总金额
     */
    @ApiModelProperty(value = "订单总金额",required = true)
    private BigDecimal orderAmount;
    /**
     * 订单商品列表
     */
    @ApiModelProperty(value = "订单商品列表", example = "这是一个测试订单商品列表",required = true)
    @NotNull(message = "添加订单失败必须添加商品列表")
    private List<SkuInOrderAddNewDTO> skuIdList;

    /*
    * 前端所传订单对象大致是：
    * {
    * “订单备注”:"123123",
    * "优惠金额":123,
    * "商品列表"：[{"sku":123,"sku_count":22,"goods_price":123.22},
    *            {"sku":124,"sku_count":44,"goods_price":14123.22}]
    * }
    * */

}
